-- GENERATED SPELL FOR [Malefic Necromancer] --


function spell0_31155(pUnit, Event) --@Bone Armor,n/a--
pUnit:FullCastSpellOnTarget(50324,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31155', 648, 1)
end

function spell1_31155(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(34344,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31155', 2000, 1)
end

function Sorts_31155(pUnit, Event)
local choix_sorts_31155 = math.random(0, 1)
if choix_sorts_31155 == 0 then
pUnit:RegisterEvent('spell0_31155', 1, 1)
end
if choix_sorts_31155 == 1 then
pUnit:RegisterEvent('spell1_31155', 1, 1)
end
end

function mob31155_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31155', math.random(1500, 3000), 1)
end

function mob31155_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31155_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31155_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31155, 1, 'mob31155_Action')
RegisterUnitEvent(31155, 2, 'mob31155_Leave')
RegisterUnitEvent(31155, 3, 'mob31155_Kill')
RegisterUnitEvent(31155, 4, 'mob31155_Die')
